// 设置用户信息到 sessionStorage
const setUserSession = (key,data) => {
    sessionStorage.setItem(key, JSON.stringify(data));
  };
  
  // 从 sessionStorage 中获取用户信息
  const getUserSession = (key) => {
    const userJSON = sessionStorage.getItem(key);
    return userJSON ? JSON.parse(userJSON) : null;
  };
  
  // 清除用户信息从 sessionStorage
  const clearUserSession = (key) => {
    sessionStorage.removeItem(key);
  };
  
  export { setUserSession, getUserSession, clearUserSession };
  